package edu.yzu.testspringboot002.po.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import edu.yzu.testspringboot002.common.group.DefaultGroup;
import edu.yzu.testspringboot002.common.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;


import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel(value = "字典数据")
public class SysDictDataDTO implements Serializable {
    private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "id")
	@NotNull(message="id不能为空", groups = UpdateGroup.class)
	private Long id;

	@ApiModelProperty(value = "字典类型ID")
	@NotNull(message="字典类型ID不能为空", groups = DefaultGroup.class)
	private Long dictTypeId;

	@ApiModelProperty(value = "字典标签")
	@NotBlank(message="字典标签不能为空", groups = DefaultGroup.class)
	private String dictLabel;

	@ApiModelProperty(value = "字典值")
	private String dictValue;

	@ApiModelProperty(value = "备注")
	private String remark;

	@ApiModelProperty(value = "排序")
	@Min(value = 0, message = "排序不能为空", groups = DefaultGroup.class)
	private Integer sort;

	@ApiModelProperty(value = "创建时间")
	@JsonProperty(access = JsonProperty.Access.READ_ONLY)
	private Date createDate;

	@ApiModelProperty(value = "更新时间")
	@JsonProperty(access = JsonProperty.Access.READ_ONLY)
	private Date updateDate;
	
	@ApiModelProperty(value = "类型")
	private String dataType;
}